<!DOCTYPE HTML>
<html>
	<head>
		<title>耿商</title>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
		<link rel="stylesheet" data-th-href="@{css/index/main.css}" />
		<noscript><link rel="stylesheet" data-th-href="@{css/index/noscript.css}" /></noscript>
		
		<!-- Scripts -->
		<script data-th-src="@{js/index/jquery.min.js}"></script>
		<script data-th-src="@{js/index/browser.min.js}"></script>
		<script data-th-src="@{js/index/breakpoints.min.js}"></script>
		<script data-th-src="@{js/index/util.js}"></script>
		<script data-th-src="@{js/index/main.js}"></script>
		
		<script data-th-inline="javascript">
		var typeName = [[${typeName}]];
		var isInit = false;
		</script>
		
		<script data-th-inline="javascript">
			$(function(){
				showType();
			})
			
			function showType(){
				$.post("/lr/type/list",{},function(data){
					$(data).each(function(i,item){
						$("#menu ul").append('<li><a href="javascript:void(0)">'+item.typeName+'</a></li>');
					})
					
					$("#menu ul li").click(function(){
						var typeName = $(this).find("a").text();
						showGoods(typeName);
					})
					
					showGoods(typeName);
				})
			}
			
			function showGoods(typeName){
				var param = {};
				
				if(typeName!=null && typeName!=""){
					typeName = '-'+typeName+'-';
					param['search_LIKE_typeIds'] = typeName;
				}
				
				
				$.post("lr/goods/list",param,function(data){
					$(".tiles").html("");
					$(data).each(function(i,item){
						var pics = item.pic;
						if(pics!=null && pics!=""){
							pics = pics.split(";")[0];
						}
						
						var ti = '<article class="style1"><span class="image"><img src="'+pics+'" alt="" /></span><a href="/lr/generic/'+item.id+'"><h2>￥'+item.price+'</h2><p>'+item.name+'</p></a></article>';
						
						$(".tiles").append(ti);
					})
					
					//页面动作初始化
					if(!isInit){
						mainInit();
						isInit = true;
					}
				})
			}
		</script>
	</head>
	<body class="is-preload">
		<!-- Wrapper -->
			<div id="wrapper">

				<!-- Header -->
					<header id="header">
						<div class="inner">
							<!-- Logo -->
								<a href="#" class="logo">
									<span class="symbol"><img src="img/index/logo.svg" alt="" /></span><span class="title">耿大</span>
								</a>
							<!-- Nav -->
								<nav>
									<ul>
										<li><a href="#menu">Menu</a></li>
									</ul>
								</nav>
						</div>
					</header>

				<!-- Menu -->
					<nav id="menu">
						<h2>Menu</h2>
						<ul>
							<!-- <li><a href="index.html">上新</a></li>
							<li><a href="generic.html">大衣风衣</a></li>
							<li><a href="generic.html">羽绒服</a></li>
							<li><a href="generic.html">裤子裙装</a></li>
							<li><a href="elements.html">内搭外套</a></li>
							<li><a href="elements.html">特价</a></li> -->
						</ul>
					</nav>

				<!-- Main -->
					<div id="main">
						<div class="inner">
							<header>
								<h1>进店须知</h1>
								<p>一周内发货，不接急单！无特殊说明尺码为SML！不可退货，可换码！特价不退不换！</p>
							</header>
							<section class="tiles">
								<!-- <article class="style1">
									<span class="image">
										<img src="img/index/pic01.jpg" alt="" />
									</span>
									<a href="generic.html">
										<h2>￥199</h2>
										<p>商品名称</p>
									</a>
								</article>
								 -->
								
							</section>
						</div>
					</div>
			</div>
	</body>
</html>